package com.mcxx.convert;


import com.mcxx.modules.system.entity.TaskExportEntity;
import com.mcxx.util.Constant;
import com.yinhai.ta404.component.audit.vo.ExcelInfo;
import com.yinhai.ta404.core.security.vo.UserAccountVo;

import java.util.Date;


public class ExcelConvert {
    public static TaskExportEntity convertTaskExport(UserAccountVo accountVo, ExcelInfo excelInfo,String taskTitle,String objectkey) {
        TaskExportEntity taskExport = new TaskExportEntity();
        taskExport.setId(Constant.getUUID());
        taskExport.setUserid(accountVo.getUserId());
        taskExport.setTaskName(excelInfo.getFileName());
        taskExport.setTaskTitle(taskTitle);
        taskExport.setParam("xls");
        taskExport.setCreateTime(new Date());
        taskExport.setFileUrl(objectkey);
        taskExport.setState("02");
        return taskExport;
    }
}
